Remove incorrect check for terminating nul character.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 13:30:45 +0000 (13:30 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Fri, 1 Jul 2005 13:30:45 +0000 (13:30 +0000)
The terminating nul character is not stored in the store but
added by read_reply.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_probe.c

index 2ee59a3084e892293a128ba0acaf4d2194196f02..55226be32bd5d2fd16ab1739c420ce85cdf2d992 100644 (file)
@@ -103,12 +103,6 @@ char *xenbus_read(const char *dir, const char *name, unsigned int *data_n)
         } else if(n == 0){
                 err = -ENOENT;
                 kfree(data);
-        } else if(data[n - 1] != '\0') {
-                /* This shouldn't happen: everything is supposed to be a string. */
-               printk("XENBUS: Reading path %s: missing null terminator len=%i\n", path, n); 
-                err = -EINVAL;
-                kfree(data);
-                n = 0;
         }
         kfree(path);
   out: